import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
//svg插件需要的配置代码
import 'virtual:svg-icons-register'
//注册全局组件
import gloablComponent from './components'
//markdown配置
import VueMarkdownEditor from '@kangc/v-md-editor'
import '@kangc/v-md-editor/lib/style/base-editor.css'
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js'
import Prism from 'prismjs'
import VMdPreview from '@kangc/v-md-editor/lib/preview'
import '@kangc/v-md-editor/lib/style/preview.css'
// 引入使用主题的样式
import '@kangc/v-md-editor/lib/theme/style/vuepress.css'

VMdPreview.use(vuepressTheme, {
    Prism,
})

VueMarkdownEditor.use(vuepressTheme, {
    Prism,
})

const app = createApp(App)
app.use(VueMarkdownEditor)
app.use(VMdPreview)
//国际化配置
app.use(ElementPlus, {
    locale: zhCn,
})
app.use(router).use(gloablComponent)
app.mount('#app')
